﻿using Microsoft.AspNetCore.Builder;
using Project.Core.Config.Config.Swagger;

namespace Project.Core.Config {
    public static class AppExtensions {
        public static IApplicationBuilder AddApp(this IApplicationBuilder app) {
            app.UseLibrarySwagger();

            app.UseStaticFiles();

            app.UseRouting();
            //跨域
            app.UseCors("Cors");
            //1.先开启认证
            app.UseAuthentication();
            //2.再开启授权
            app.UseAuthorization();

            return app;
        }
    }
}
